package com.wwc.sc.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * bean 的配置类
 * @author WWC
 */
@Configuration
public class BeanConfig {

    /**
     * 创建一个 RestTemplate bean
     * @return
     */
    @Bean
    @LoadBalanced //配置负载均衡实现 RestTemplate Ribbon
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }


}
